package cn.tedu.store.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 远程访问product-service服务
 */
@FeignClient(name = "product-service")
public interface ProductServiceClient {
    @PostMapping("/products/increaseProductNum")
    public void increaseProductNum(@RequestBody Integer pid, @RequestParam(value = "num") Integer num);

    @PostMapping("/products/reduceProductNum")
    public void reduceProductNum(@RequestBody Integer pid, @RequestParam(value = "num") Integer num);
}
